package show.lmm.invokeapp.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import reactor.core.publisher.Mono;
import show.lmm.invokeapp.core.client.TestAppClient;

@RestController("/")
public class IndexController {

    private final TestAppClient testAppClient;

    public IndexController(TestAppClient testAppClient) {
        this.testAppClient = testAppClient;
    }

    @GetMapping("/get/server_info")
    public Mono<String> getServerInfo() {
        return testAppClient.getServerInfo("invoke");
    }
}
